import { Button } from '@/components/ui/button'
import { auth } from '@/auth'
import Link from 'next/link'
import { redirect } from 'next/navigation'

export default async function Home() {
  const session: any = await auth()
  // 如果用户已经登录
  if (session) {
    redirect(`/${session.user?.currentTeamSlug}`)
  }

  return (
    <div>
      <Button>
        <Link href={'/login'}>去登陆</Link>
      </Button>
      12312312
    </div>
  )
}
